/**
 * Created by Dalyn on 2017/3/28.
 */
import Relay from "react-relay";

export default class GetGoodsImportMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getImportGoodsList }`;
    }

    getVariables() {
        return {
            argsInput: {
                pageSize: this.props.pageSize,
                pageNum: this.props.pageNum,
                companyId:this.props.companyId,
                categoryId: this.props.categoryId,
                productName: this.props.productName,
                goodsId: this.props.goodsId,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getImportGoodsListPayload {
            responseData {  
                errorCode
                value
                totalResult
                id
                goodsProperty
                companyList
                goodsInfoDescModel{
                    
                   
                    goodsId
                    
               
                }
                goodsInfoDescModelList{
                    goodsId
                    productName
                    styleNo
                    constituent
                    specification
                    gramWeight
                    larghezza
                    description
                    ranzhengProcess
                    yarn
                    fabricWeave
                    density
                    season
                    purpose
                    carding
                    networkType
                    thickness
                    weftYarn
                    high
                    weavingProcess
                    colour
                    size
                    prickle
                    yarnTypes
                    yarnState
                    isImport
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on getImportGoodsListPayload {
                    responseData {
                        errorCode
                        value
                        totalResult
                        id
                        goodsProperty
                        companyList
                        goodsInfoDescModel{
                    
                   
                            goodsId
                    
               
                        }
                        goodsInfoDescModelList{
                            goodsId
                            productName
                            styleNo
                            constituent
                            specification
                            gramWeight
                            larghezza
                            description
                            ranzhengProcess
                            yarn
                            fabricWeave
                            density
                            season
                            purpose
                            carding
                            networkType
                            thickness
                            weftYarn
                            high
                            weavingProcess
                            colour
                            size
                            prickle
                            yarnTypes
                            yarnState
                            isImport
                        }                       
                    }
                }
            `]
        }];
    }

}